package com.ruoyi.zhjd.laboratory.modules.laboratoryMechanicsYGroup.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.zhjd.laboratory.modules.laboratoryMechanicsYGroup.entity.MechanicsYDetailEntity;
import com.ruoyi.zhjd.laboratory.modules.laboratoryMechanicsYGroup.mapper.MechanicsYDetailMapper;
import com.ruoyi.zhjd.laboratory.modules.laboratoryMechanicsYGroup.service.MechanicsYDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("mechanicsYDetailService")
public class MechanicsYDetailServiceImpl extends ServiceImpl<MechanicsYDetailMapper, MechanicsYDetailEntity> implements MechanicsYDetailService {

    @Autowired
    private MechanicsYDetailMapper mechanicsYDetailMapper;

//    @Autowired
//    private BaseServiceComponent baseServiceComponent;

    /**
     * 列表
     */
    @Override
    public IPage<MechanicsYDetailEntity> queryPage(Map<String, Object> params) {
//        IPage<MechanicsYDetailEntity> page = baseServiceComponent.getPage(params, MechanicsYDetailEntity.class);
        return baseMapper.query(null, params);
    }

    /**
     * 信息
     *
     * @return MechanicsWDetailEntity
     */
    @Override
    public MechanicsYDetailEntity getInfo(Integer id) {
        return getById(id);
    }

    /**
     * 保存
     */
    @Override
    public void saveData(MechanicsYDetailEntity mechanicsWDetail) {
        save(mechanicsWDetail);
    }

    /**
     * 修改
     */
    @Override
    public void updateData(MechanicsYDetailEntity mechanicsWDetail) {
        updateById(mechanicsWDetail);
    }

    /**
     * 删除单条数据
     *
     * @param id
     */
    @Override
    public void deleteOneData(Integer id) {
        removeById(id);
    }

    /**
     * 删除
     */
    @Override
    public void deleteData(List<Integer> ids) {
        removeByIds(ids);
    }
}
